<!--
 * @Author: 持禅 1791106511@qq.com
 * @Date: 2023-11-09 17:38:12
 * @LastEditors: 持禅 1791106511@qq.com
 * @LastEditTime: 2023-11-09 17:38:51
 * @FilePath: \菜瓜子3-代付-跳小程序付款c:\Users\Administrator\AppData\Local\Temp\fz3temp-3\login.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>{:_doadminName}</title>
		<!-- 样 式 文 件 -->
		<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
		<link rel="stylesheet" href="/static/admin/css/other/login.css" />
	</head>
    <!-- 代 码 结 构 -->
	<body background="/static/admin/images/background.svg" style="background-size: cover;">
		<form class="layui-form" action="javascript:void(0);" id="formId">
			<div class="layui-form-item">
				<img class="logo" src="/static/admin/images/logo.png" />
				<div class="title">{:_doadminName}</div>
				<div class="desc">
					小程序后台
				</div>
			</div>
			<div class="layui-form-item">
				<input placeholder="账 户 :  " autocomplete="off" spellcheck="false" name="username" lay-verify="required" hover class="layui-input"  />
			</div>
			<div class="layui-form-item">
				<input placeholder="密 码 :  "  type="password" autocomplete="off" spellcheck="false" name="password" lay-verify="required" hover class="layui-input"  />
			</div>
			<div class="layui-form-item">
				<input placeholder="验证码 : " autocomplete="off" spellcheck="false"  name="code" hover  lay-verify="required" class="code layui-input layui-input-inline"  />
				<img src="{:captcha_src()}?time={:time()}" style="width:115px;height:40px;" class="codeImage" onclick="ghYzm(this)" />
			</div>
			<!-- <div class="layui-form-item">
				<input type="checkbox" name="" title="记住密码" lay-skin="primary" checked>
			</div> -->
			<div class="layui-form-item">
				<button type="button" class="pear-btn pear-btn-success login" lay-submit lay-filter="login">
					登 入
				</button>
			</div>
		</form>
		<!-- 资 源 引 入 -->
        <script src="/static/user/js/jquery.min.js"></script>
		<script src="/static/component/layui/layui.js"></script>
		<script src="/static/component/pear/pear.js"></script>
		<script>
			localStorage.setItem("theme-color",1);
			//
              _time={:time()};
            function ghYzm(item){
                _time++;
                $(item).attr("src",`{:captcha_src()}?time=${_time}`);
            }
			layui.use(['form', 'button', 'popup'], function() {
				var form = layui.form;
				var button = layui.button;
				var popup = layui.popup;
				
                // 登录事件
				form.on('submit(login)', function(data) {
					
					// 登录逻辑
					
					// 登录过渡
					button.load({
						elem: '.login',
						time: 1500,
						done: function() {
                            var data = $("#formId");
                            postDatai("{:url('login/dologin')}",data).then(function(res){
                                if(res.code==200){
                                    popup.success(res.message, function() {
                                            location.href = "/admin/"
                                        
                                    });
                                    return;
                                }
                                layer.msg(res.message, {
                                    icon: 2,
                                    time: 1000
                                });

						    })
                        }
					})
					return false;
				});
			})
		</script>
        {include file="base/unitjs"}
	</body>
</html>
